home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4729 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  35 lines

  1. Path: rover.ucs.ualberta.ca!mcbride
  2. From: mcbride@ee.ualberta.ca (Darin McBride)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Watcom: pad a string ?
  5. Date: 6 Feb 1996 18:38:23 GMT
  6. Organization: University of Alberta Electrical Engineering Department
  7. Message-ID: <4f876v$2002@pulp.ucs.ualberta.ca>
  8. References: <ZCOExQTC3kJT089yn@pinerolo.gvo.it>
  9. NNTP-Posting-Host: hp05.ee.ualberta.ca
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Alberto Velo (albe@pinerolo.gvo.it) wrote:
  13. > struct, I find additional garbage chars in the file, who fill the array sizes.
  14. > For example, I fill msg.from with "Myname"; from is defined as 3 chars array, 
  15. > in the struct: when I write the entire struct to the file, the from field 
  16. > appears to be "Myname   @ # *รจ 3 ..." , that is "Myname" + extra garbage for a 
  17. > total of 36 chars.
  18.  
  19. Since the Fido pkt's are binary, just leave it...
  20.  
  21. What will really appear is:
  22.  
  23. 'M', 'y', 'n', 'a', 'm', 'e', '\0', ...
  24.  
  25. At this point you don't care what's in the rest of the characters.
  26.  
  27. --
  28. Darin McBride:mcbride@ee.ualberta.ca/mcbride@tower.bohica.net
  29.  
  30. Enjoy each day as if it were your last, care about each moment as if
  31. it were your last for one day, one moment, you *will* be right!
  32.  
  33. Tips & Tricks for IBM Hardware, MSDOS, OS2, Windows (including Win'95):
  34.     http://www.ee.ualberta.ca/~mcbride/tiptrick.html
  35.